<template>
  <Module :cfg="moduleCfg">
    <div class="item-group">
      <div class="item" v-for="item in getData" :class="item.code" :key="item.code">
        <div class="name">{{ item.name }}</div>
        <div class="num">{{ item.num }}</div>
      </div>
    </div>
  </Module>
</template>

<script>
import Module from 'comp/common/Module';

export default {
  name: "OutsideDev",
  components: {
    Module
  },
  props: ['data'],
  data() {
    return {
      moduleCfg: {
        icon: WebCfg.icons.outsideDev,
        title: `场外设施`
      }
    }
  },
  computed: {
    getData() {
     return [
        {
          name: '摄像机',
          num: this.data['cameraCount'],
          code: 'cameraCount'
        },
        {
          name: '情报板',
          num: this.data['qbCount'],
          code: 'qbCount'
        },
        {
          name: '交调',
          num: this.data['jtCount'],
          code: 'jtCount'
        }
      ]
    }
  }
}
</script>

<style scoped lang="scss">
.item {
  background: url("~img/index/outsideDev_bg.png") bottom center no-repeat;
  background-size: 75px auto;
  width: calc(1 / 3 * 100%);
  text-align: center;

  .name {
    color: var(--font-green-color);
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 5px;
  }

  .num {
    font-family: 'D-DIN-PRO', serif;
    line-height: 30px;
    font-size: 20px;
    color: #ddd;
  }
}
</style>
